import request from '@/utils/request'

// 查询测试单表列表
export function getDashboardDetail() {
  return request({
    url: '/cms/detail',
    method: 'get'
  })
}

export function getCategory() {
  return request({
    url: '/cms/treeCategory',
    method: 'get'
  })
}

export function getCategoryList() {
  return request({
    url: '/cms/getCategoryList',
    method: 'get'
  })
}

export function getFormList() {
  return request({
    url: '/cms/getFormList',
    method: 'get'
  })
}

export function saveCategory(data) {
  return request({
    url: '/cms/save/category',
    method: 'post',
    data: data
  })
}

export function updateCategory(data) {
  return request({
    url: '/cms/update/category',
    method: 'post',
    data: data
  })
}

export function findCategory(id) {
  return request({
    url: '/cms/find/category/'+id,
    method: 'get'
  })
}

export function deleteCategory(id) {
  return request({
    url: '/cms/delete/'+id,
    method: 'post'
  })
}

export function getFormListAll() {
  return request({
    url: '/cms/form/list',
    method: 'get'
  })
}

export function saveForm(data) {
  return request({
    url: '/cms/form/save',
    method: 'post',
    data: data
  })
}

export function updateForm(data) {
  return request({
    url: '/cms/form/update',
    method: 'post',
    data: data
  })
}

export function getForm(id) {
  return request({
    url: '/cms/form/find/'+id,
    method: 'get'
  })
}

export function deleteForm(id) {
  return request({
    url: '/cms/form/delete/'+id,
    method: 'post'
  })
}

export function getFieldList(formId) {
  return request({
    url: '/cms/field/list?formId='+formId,
    method: 'get'
  })
}

export function saveField(data) {
  return request({
    url: '/cms/field/save',
    method: 'post',
    data: data
  })
}

export function updateField(data) {
  return request({
    url: '/cms/field/update',
    method: 'post',
    data: data
  })
}

export function getField(id) {
  return request({
    url: '/cms/field/find/'+id,
    method: 'get'
  })
}

export function deleteField(id) {
  return request({
    url: '/cms/field/delete/'+id,
    method: 'post'
  })
}

export function updateSystem(data) {
  return request({
    url: '/cms/updateSystem',
    method: 'post',
    data: data
  })
}

export function getSystem() {
  return request({
    url: '/cms/getSystem',
    method: 'get'
  })
}





